package eg.backend.repository;

import java.util.List;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import eg.backend.base.GoalStatus;
import eg.backend.base.repository.EntityRepository;
import eg.backend.domain.Goal;

@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public interface GoalRepository extends EntityRepository<Goal, String> {
	List<Goal> findByUser(String user);
	
	List<Goal> findByUserAndStatus(GoalStatus status, String user);
}